﻿using System;
using JTLeigh.Commerce.Spencer.Features.ProductImages.Common.Entities;

namespace JTLeigh.Commerce.Spencer.Features.ProductImages.Business.Caches
{

	/// <summary>
	/// Cache used to store product image metadata.
	/// </summary>
	public interface IProductImageMetadataCache
	{

		#region Methods

		/// <summary>
		/// Gets the product image metadata from the cache.
		/// </summary>
		/// <param name="tenantId">The tenant identifier <see cref="Guid"/> of the tenant whose
		/// product image metadata is to be retrieved.</param>
		/// <returns>The <see cref="ProductImageMetadata"/> object from the cache, or <see langword="null" /> 
		/// if the product image metadata has not been cached.</returns>
		ProductImageMetadata GetProductImageMetadata(Guid tenantId);

		/// <summary>
		/// Sets the product image metadata in the cache.
		/// </summary>
		/// <param name="tenantId">The tenant identifier <see cref="Guid"/> of the tenant whose
		/// product image metadata is to be stored.</param>
		/// <param name="metadata">The <see cref="ProductImageMetadata"/> object to store.</param>
		void SetProductImageMetadata(Guid tenantId, ProductImageMetadata metadata);

		#endregion // Methods

	}

}
